<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	template="/layout/page/sample/left-right-template.xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:a4j="http://www.sinosoft.com.cn/a4j"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

	<ui:param name="compId" value="#{commonContentViewBean.id}" />
	<ui:param name="treeViewBean"
		value="#{commonContentViewBean.getView(0)}" />
	<ui:param name="compLeftTitle" value="笔录模板管理" />

	<ui:param name="topTitle" value="查询" />

	<ui:define name="compLeft">
		<h:form id="#{compId}_form">
			<p:toolbar>
				<p:toolbarGroup align="left">
					<p:commandButton
						onstart="btnAction('#{commonContentViewBean.id}','添加笔录模板','400','250','icons/cog_add.png','add','record-scene','rcd-add');"
						title="添加笔录模板" image="ui-icon-disk" value="添加">

					</p:commandButton>
					<p:commandButton
						onstart="btnAction('#{commonContentViewBean.id}','编辑笔录模板','400','250','icons/cog_add.png','update','record-scene','rcd-edit');"
						title="编辑笔录模板" image="ui-icon-disk" value="编辑">

					</p:commandButton>
					<p:commandButton actionListener="#{recordAction.delete}"
						onstart="if(confirm('确认要删除笔录模板吗？')){return true;}else{return false;}"
						title="删除笔录模板" image="ui-icon-trash" value="删除"
						update="#{compId}_form:#{commonContentViewBean.id}_tree">
						<h:inputHidden value="#{treeViewBean.id}" />
					</p:commandButton>
					
				</p:toolbarGroup>
			</p:toolbar>


			<ui:decorate
				template="/layout/iteration/tree/sino-tree-single-template.xhtml">
				<ui:param name="compViewBean" value="#{treeViewBean}" />
				<ui:param name="compId" value="#{commonContentViewBean.id}_tree" />
				<ui:param name="compSelectedNodeUpdate"
					value="#{commonContentViewBean.getView(1).id}_questionForm" />
			</ui:decorate>

		</h:form>

	</ui:define>

	<ui:define name="compRight">
		<div style="width: 100%; height: 100%; overflow: auto;"><ui:include
					src="/includes/model/manage/record/questionLayout.xhtml" /></div>
	</ui:define>
</ui:composition>